Sign up Free. Don't forget to check out our challenges, lessons, solve and learn series and more ...
filename = input('Enter a file name: ')
try:
f = open (filename, "r")
except:
print ('There is no file named', filename )
#Example from: http://www.annedawson.net/Python3Programs.txt